﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using VietTrips.Domain.Models;

namespace VietTrips.WebUI.Areas.Management.Models
{
    public class TourAgencyViewModel
    {
        public TourAgencyViewModel()
        {
            Addresses = new HashSet<Address>();
        }

        public TourAgencyViewModel(TourAgency agency)
        {
            TourAgencyId = agency.TourAgencyId;
            ManagerId = agency.ManagerId;
            TourAgencyName = agency.TourAgencyName;
            LogoImageUrl = agency.LogoImageUrl;
            Description = agency.Description;
            HotLine1 = agency.HotLine1;
            HotLine2 = agency.HotLine2;
            Fax = agency.Fax;
            Website = agency.Website;
            RequestStatus = agency.RequestStatus;
            CreatedDate = agency.CreatedDate ?? DateTime.UtcNow;
            LastModified = agency.LastModified;
            IsDeleted = agency.IsDeleted;
            Addresses = agency.Addresses;
        }

        [Required]
        public int TourAgencyId { get; set; }

        public int? ManagerId { get; set; }

        [Required]
        public string TourAgencyName { get; set; }

        public string LogoImageUrl { get; set; }

        public string Description { get; set; }

        [Required]
        public String HotLine1 { get; set; }

        public String HotLine2 { get; set; }

        public String Fax { get; set; }

        public string Website { get; set; }

        public string RequestStatus { get; set; }
        public DateTime? CreatedDate { get; set; }
        public DateTime LastModified { get; set; }
        public bool IsDeleted { get; set; }

        public ICollection<Address> Addresses { get; set; }
    }
}